{
	function test(x, y = 'world') {
		console.log('默认值', x, y);
	}

	test('Hello');
	test('Hello', 'man');
}

{
	let x = 'test';

	function test2(x, y = x) {
		console.log('作用域', x, y);
	}

	test2('kill');
}

{
	//不确定参数数量
	function test3(...arg) {
		for (let v of arg) {
			console.log('rest', v);
		}
	}
	test3(1, 2, 3, 4, 5, 'a');
}

{
	console.log(...[1, 2, 4]);
	console.log('a', ...[1, 2, 4]);
}

{
	//v是参数 => 后是返回值 arrow函数名
	//有参数
	let arrow = v => v * 2;
	//无参数
	let arrow2 = () => 5;
	console.log('arrow',arrow(3));
	console.log('arrow2',arrow2());
}

{
	function tail(x){
		console.log('tail',x);
	}
	function fx(x){
		return tail(x);
	}
	fx(123);
}
